<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.14"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>LibQQt: QQtWavAudioInput Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="logo.png"/></td>
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">LibQQt
   &#160;<span id="projectnumber">v3.1</span>
   </div>
   <div id="projectbrief">开源、跨平台Qt应用程序框架中间件</div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.14 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
var searchBox = new SearchBox("searchBox", "search",false,'Search');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
/* @license-end */</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pro-methods">Protected Member Functions</a> &#124;
<a href="class_q_qt_wav_audio_input-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">QQtWavAudioInput Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>The <a class="el" href="class_q_qt_wav_audio_input.html" title="The QQtWavAudioInput class QQtWavAudioInput具备QAudioInput的能力，可以把wav文件的音频帧，通过readyRea...">QQtWavAudioInput</a> class QQtWavAudioInput具备QAudioInput的能力，可以把wav文件的音频帧，通过readyRead输出。 每次/10ms一帧，通过QIODevice readyRead发射给用户。 升级目标：QQtAudioInput里支持的设备比较广泛，文件类型比较多。  
 <a href="class_q_qt_wav_audio_input.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="qqtwavaudiomanager_8h_source.html">qqtwavaudiomanager.h</a>&gt;</code></p>
<div class="dynheader">
Inheritance diagram for QQtWavAudioInput:</div>
<div class="dyncontent">
 <div class="center">
  <img src="class_q_qt_wav_audio_input.png" usemap="#QQtWavAudioInput_map" alt=""/>
  <map id="QQtWavAudioInput_map" name="QQtWavAudioInput_map">
</map>
 </div></div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a57bf9666b4ef414f444f4c71860e8932"><td class="memItemLeft" align="right" valign="top"><a id="a57bf9666b4ef414f444f4c71860e8932"></a>
&#160;</td><td class="memItemRight" valign="bottom"><b>QQtWavAudioInput</b> (QObject *parent=nullptr)</td></tr>
<tr class="separator:a57bf9666b4ef414f444f4c71860e8932"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a11ac936b4db0932d58e106e0d5a03d14"><td class="memItemLeft" align="right" valign="top"><a id="a11ac936b4db0932d58e106e0d5a03d14"></a>
QIODevice *&#160;</td><td class="memItemRight" valign="bottom"><b>setSourceFile</b> (const QString &amp;localFile)</td></tr>
<tr class="separator:a11ac936b4db0932d58e106e0d5a03d14"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:adc643e5f6f6ea4709b5772ed850cef87"><td class="memItemLeft" align="right" valign="top"><a id="adc643e5f6f6ea4709b5772ed850cef87"></a>
QString&#160;</td><td class="memItemRight" valign="bottom"><b>sourceFile</b> ()</td></tr>
<tr class="separator:adc643e5f6f6ea4709b5772ed850cef87"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa3cc2e99384f792380719db50f6fe24a"><td class="memItemLeft" align="right" valign="top"><a id="aa3cc2e99384f792380719db50f6fe24a"></a>
QIODevice *&#160;</td><td class="memItemRight" valign="bottom"><b>device</b> ()</td></tr>
<tr class="separator:aa3cc2e99384f792380719db50f6fe24a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab969eaa0e3c548b3b6b257712ce02baf"><td class="memItemLeft" align="right" valign="top"><a id="ab969eaa0e3c548b3b6b257712ce02baf"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>timerInterval</b> () const</td></tr>
<tr class="separator:ab969eaa0e3c548b3b6b257712ce02baf"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa64d5a89549a5edb1b93f20391710627"><td class="memItemLeft" align="right" valign="top"><a id="aa64d5a89549a5edb1b93f20391710627"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>setTimerInterval</b> (int millSecond=20)</td></tr>
<tr class="separator:aa64d5a89549a5edb1b93f20391710627"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5ea1d4793d2b2577ed1c6a3746e36c7b"><td class="memItemLeft" align="right" valign="top"><a id="a5ea1d4793d2b2577ed1c6a3746e36c7b"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>start</b> ()</td></tr>
<tr class="separator:a5ea1d4793d2b2577ed1c6a3746e36c7b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2f8b32ae5f647313ae379c5db655a2d7"><td class="memItemLeft" align="right" valign="top"><a id="a2f8b32ae5f647313ae379c5db655a2d7"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><b>stop</b> ()</td></tr>
<tr class="separator:a2f8b32ae5f647313ae379c5db655a2d7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a8b3e5cff42178a0d68af73bede2f3eea"><td class="memItemLeft" align="right" valign="top"><a id="a8b3e5cff42178a0d68af73bede2f3eea"></a>
const QAudioFormat &amp;&#160;</td><td class="memItemRight" valign="bottom"><b>format</b> ()</td></tr>
<tr class="separator:a8b3e5cff42178a0d68af73bede2f3eea"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a93cb308096589fe185cc6c83fdf6272a"><td class="memItemLeft" align="right" valign="top"><a id="a93cb308096589fe185cc6c83fdf6272a"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>fileTotalSize</b> ()</td></tr>
<tr class="separator:a93cb308096589fe185cc6c83fdf6272a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a169b0b78547b4d927db8a13554179be8"><td class="memItemLeft" align="right" valign="top"><a id="a169b0b78547b4d927db8a13554179be8"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>fileHeaderSize</b> ()</td></tr>
<tr class="separator:a169b0b78547b4d927db8a13554179be8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac9dbb88ad60c53bb59391f763cac8cb"><td class="memItemLeft" align="right" valign="top"><a id="aac9dbb88ad60c53bb59391f763cac8cb"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>fileDataSize</b> ()</td></tr>
<tr class="separator:aac9dbb88ad60c53bb59391f763cac8cb"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aaae2e966e79231aa5199101c8b7b30e8"><td class="memItemLeft" align="right" valign="top"><a id="aaae2e966e79231aa5199101c8b7b30e8"></a>
int&#160;</td><td class="memItemRight" valign="bottom"><b>fileTailSize</b> ()</td></tr>
<tr class="separator:aaae2e966e79231aa5199101c8b7b30e8"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pro-methods"></a>
Protected Member Functions</h2></td></tr>
<tr class="memitem:aab3d5ae09ef1f74f73d555716835bc4f"><td class="memItemLeft" align="right" valign="top"><a id="aab3d5ae09ef1f74f73d555716835bc4f"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>anlysisWavFileHeader_C</b> (QString localFile)</td></tr>
<tr class="separator:aab3d5ae09ef1f74f73d555716835bc4f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a543a98b9ca655f1bcb565af36ca56d03"><td class="memItemLeft" align="right" valign="top"><a id="a543a98b9ca655f1bcb565af36ca56d03"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><b>anlysisWavFileHeader</b> (QString fileName)</td></tr>
<tr class="separator:a543a98b9ca655f1bcb565af36ca56d03"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>The <a class="el" href="class_q_qt_wav_audio_input.html" title="The QQtWavAudioInput class QQtWavAudioInput具备QAudioInput的能力，可以把wav文件的音频帧，通过readyRea...">QQtWavAudioInput</a> class QQtWavAudioInput具备QAudioInput的能力，可以把wav文件的音频帧，通过readyRead输出。 每次/10ms一帧，通过QIODevice readyRead发射给用户。 升级目标：QQtAudioInput里支持的设备比较广泛，文件类型比较多。 </p>
<p>原理，设置Sourcefile，返回QIODevice，进行读取。一次加载，逐渐读取。</p>
<p>不要使用大文件。 Qt 中有一个 QBuffer 类，可以将 QByteArray 包装成一个 QIODevice。QMemIODevice = QBuffer 如果来的是个QByteArray，那么，用QBuffer封装， 在 open 函数中调用 QIODevice::open(mode) 要解析wav，用自定义程序，还是用开源Library（libsndfile）？自定义程序 要播放wav，是用wav的音频格式来设定输出设备，还是用个输出设备支持的音频格式，wav里选取进行使用？使用wav的。</p>
<p>尝试用QAudioDecoder，解码器不支持x-wav，defaultServiceProvider::requestService(): no service found for - "org.qt-project.qt.audiodecode" 为什么QSoundEffect支持那么多wav格式？("audio/x-wav", "audio/wav", "audio/wave", "audio/x-pn-wav") QAudioDecoder保存了一个提交，#5643241 QWavAudioEffect保存了一个提交，#5f43622 </p>
</div><hr/>The documentation for this class was generated from the following files:<ul>
<li>R:/Develop/a0-develop/LibQQt/src/multimedia/<a class="el" href="qqtwavaudiomanager_8h_source.html">qqtwavaudiomanager.h</a></li>
<li>R:/Develop/a0-develop/LibQQt/src/multimedia/qqtwavaudiomanager.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.14
</small></address>
</body>
</html>
